Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Udpate some unit and integration tests to use KRaft #10394

Conversation

scholzj
Copy link
Member

@scholzj scholzj commented Jul 26, 2024

Type of change

  • Task

Description

We have still a large amount of tests that use ZooKeeper-based Kafka clusters. For some tests, the ZooKeeper part is completely irrelevant and we should just update the tests to not use any fields that are part of ZooKeeper-based clusters in order to not have to deal later with deprecations etc. For other tests, large changes are needed. In some cases, it makes sense to keep the original ZooKeeper-based tests for as long as we support ZooKeeper.

In this PR (that updates just few tests out of many - others will follow in further PRs):

  • The JbodStorageMockTest is rewritten to use KRaft and Node Pools. The old test is kept as JbodStorageMockZooBasedTest. It will be deleted when ZooKeeepr-support is removed, but until then it seemed useful to keep it and make sure this works.
  • The other changed tests mostly don't care about ZooKeeper or Node Pool. So I just remove the fields that will be deprecated int he future to avoid any warnings.

This PR also adds a new method for generating pod names when node pools are used to KafkaResources. The old method works only for clusters not using node pools. So having an alternative method for use with node pools seemed useful for users but also for our own tests.

Checklist

  • Write tests
  • Make sure all tests pass

Signed-off-by: Jakub Scholz <www@scholzj.com>
@scholzj scholzj added this to the 0.43.0 milestone Jul 26, 2024
@scholzj scholzj requested a review from ppatierno July 26, 2024 13:31
Signed-off-by: Jakub Scholz <www@scholzj.com>
Signed-off-by: Jakub Scholz <www@scholzj.com>
Copy link
Member

@ppatierno ppatierno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@scholzj scholzj merged commit a6531bc into strimzi:main Jul 29, 2024
13 checks passed
@scholzj scholzj deleted the update-some-unit-and-integration-tests-to-use-KRaft branch July 29, 2024 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants